package net.plentz.tagger;

import net.plentz.tagger.ui.widgets.views.AbstractView;
import net.plentz.tagger.ui.widgets.views.HomeView;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class Main {

	public Main() {

		Display display = new Display();
		Shell shell = new Shell();
		shell.setText("Music Tagger");
		shell.setLayout(new FillLayout());

		shell.open();

		// Add the home view
		AbstractView view = new HomeView();

		// Render
		view.render(shell, SWT.NONE);
		shell.pack();
		shell.setSize(1280, 720);

		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}

		display.dispose();

	}

	public static void main(String[] args) {
		new Main();
	}
}
